html {
  height: 100%;
}
body {
  height: inherit;
  margin: 0;
  padding: 0;
}
.resizeObserver1 {
  position: absolute;
  background-color: green;
  width: 50%;
  height: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 10px solid red;
}

.resizeObserver2 {
  position: absolute;
  background-color: #eee;
  width: 50%;
  height: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #ccc;
}

.resizeObserver2 h1 {
  margin: 0;
}

.resizeObserver2 p {
  line-height: 1.5;
}

.resizeObserver2 form  {
  width: 100%;
}

.resizeObserver2 form > div {
  display: flex;
}

.resizeObserver2 form label {
  flex: 2;
}

.resizeObserver2 form input {
  flex: 3;
}

.resizeObserver2 input[type="checkbox"] {
  height: 2rem;
}